package com.cyy.system.controller;


import cn.dev33.satoken.annotation.SaCheckLogin;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.cyy.common.domain.Response;
import com.cyy.common.pojo.vo.system.SystemArticleLikeVo;
import com.cyy.common.pojo.query.system.SystemArticleLikeQuery;
import com.cyy.common.service.ArticleLikeService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author caoyunyou
 */
@Tag(name = "文章-点赞")
@RestController
@RequestMapping("/system/article-like")
@RequiredArgsConstructor
@SaCheckLogin
public class ArticleLikeController {

    private final ArticleLikeService articleLikeService;

    @Operation(description = "分页展示文章点赞信息")
    @GetMapping("/page")
    public Response getPage(SystemArticleLikeQuery query) {
        IPage<SystemArticleLikeVo> res = articleLikeService.getPage(query);
        return Response.success().data(res);
    }
}
